Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gutenberg] Emit editor save events #18279

Merged
merged 12 commits into from
Apr 20, 2023
Merged

Conversation

SiobhyB
Copy link
Contributor

@SiobhyB SiobhyB commented Apr 17, 2023

Fixes wordpress-mobile/gutenberg-mobile#5666

Related PRs

To Test

After making some edits to a post or page, there are multiple flows to manually save based on whether a post/page is a draft, published, or scheduled. These have been outlined below.

Flows for saving a draft ⤵️
  • Tap the three dots to the upper right and then Save.
  • Tap the back button.
  • Tap the Publish button.
  • The the three dots to the upper right to get to Post Settings. From here, set the post's publish date and then Schedule.
Flows for saving a published post ⤵️
  • Tap the Update button.
  • Tap the back button.
  • The the three dots to the upper right to get to Post Settings. From here, change the post's publish date and then Schedule.
Flows for saving a scheduled post ⤵️
  • Tap the Schedule button.
  • Tap the back button.
  • The the three dots to the upper right to get to Post Settings. From here, change the post's publish date and then Schedule.

The Gutenberg and Jetpack PRs can be referred to for testing steps, and the above flows should be used as a guideline.

Regression Notes

  1. Potential unintended areas of impact

As this PR is only emitting a save event, and not changing any functionality, I can't foresee any unintended impact.

  1. What I did to test those areas of impact (or what existing automated tests I relied on)

Although I don't believe there will be unintended impact, I did some quick manual smoke testing of the editor's functionality and saving as part of this PR.

  1. What automated tests I added (or what prevented me from doing so)

N/A


PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@SiobhyB SiobhyB added the Gutenberg Editing and display of Gutenberg blocks. label Apr 17, 2023
@SiobhyB SiobhyB self-assigned this Apr 17, 2023
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 17, 2023

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr18279-75a4b55
Commit75a4b55
Direct Downloadwordpress-prototype-build-pr18279-75a4b55.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 17, 2023

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr18279-75a4b55
Commit75a4b55
Direct Downloadjetpack-prototype-build-pr18279-75a4b55.apk
Note: Google Login is not supported on these builds.

@SiobhyB SiobhyB marked this pull request as ready for review April 17, 2023 22:24
@SiobhyB SiobhyB requested review from fluiddot and jhnstn April 17, 2023 22:24
@SiobhyB SiobhyB added this to the 22.3 milestone Apr 17, 2023
build.gradle Outdated
@@ -20,7 +20,7 @@ ext {
automatticRestVersion = '1.0.8'
automatticStoriesVersion = '2.1.0'
automatticTracksVersion = '2.2.0'
gutenbergMobileVersion = 'v1.93.0'
gutenbergMobileVersion = '5663-8892d3bf572dddcf09b8cc3478bb76d2d1a7e65c'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up that the Gutenberg Mobile reference doesn't point to the last commit from wordpress-mobile/gutenberg-mobile#5663: 3b7427e1f12a6e34f5b5760c29a3db91cca33857

Copy link
Contributor

@fluiddot fluiddot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Automattic/jetpack#30131 (review).

NOTE: I've only tested these changes building the app locally.

@wpmobilebot
Copy link
Contributor

Found 1 violations:

The PR caused the following dependency changes:

 \--- project :libs:editor
-     \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:v1.93.0
-          +--- com.facebook.fresco:animated-gif:2.0.0
-          |    +--- com.parse.bolts:bolts-tasks:1.4.0
-          |    +--- com.facebook.soloader:soloader:0.6.0 -> 0.10.4 (*)
-          |    +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
-          |    \--- com.facebook.fresco:animated-base:2.0.0
-          |         +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
-          |         +--- com.facebook.fresco:imagepipeline-base:2.0.0 -> 2.5.0 (*)
-          |         +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
-          |         +--- com.facebook.fresco:animated-drawable:2.0.0
-          |         |    +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
-          |         |    +--- com.facebook.fresco:drawee:2.0.0 -> 2.5.0 (*)
-          |         |    \--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
-          |         \--- com.parse.bolts:bolts-tasks:1.4.0
-          +--- com.google.android.material:material:1.2.1 -> 1.6.0-alpha01 (*)
-          +--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-5
-          |    +--- com.google.android.exoplayer:exoplayer:2.13.3
-          |    |    +--- com.google.android.exoplayer:exoplayer-core:2.13.3
-          |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-          |    |    |    +--- com.google.android.exoplayer:exoplayer-common:2.13.3
-          |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-          |    |    |    |    \--- com.google.guava:guava:27.1-android
-          |    |    |    |         +--- com.google.guava:failureaccess:1.0.1
-          |    |    |    |         \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
-          |    |    |    \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
-          |    |    |         +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-          |    |    |         \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
-          |    |    +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
-          |    |    |    +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-          |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-          |    |    +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
-          |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-          |    |    |    \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-          |    |    +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
-          |    |    |    +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-          |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-          |    |    +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
-          |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-          |    |    |    \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-          |    |    \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
-          |    |         +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-          |    |         +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-          |    |         +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.2.1 (*)
-          |    |         \--- androidx.media:media:1.2.1 (*)
-          |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-          |    +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
-          |    +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
-          |    +--- com.google.android.exoplayer:extension-okhttp:2.13.3
-          |    |    +--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
-          |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-          |    |    \--- com.squareup.okhttp3:okhttp:3.12.11 -> 4.9.2 (*)
-          |    \--- com.squareup.okhttp3:okhttp:${OKHTTP_VERSION} -> 4.9.2 (*)
-          +--- com.github.wordpress-mobile:react-native-linear-gradient:2.5.6-wp-3
-          +--- com.github.wordpress-mobile:react-native-slider:3.0.2-wp-3
-          +--- com.github.wordpress-mobile:react-native-reanimated:2.9.1-wp-3
-          +--- com.github.wordpress-mobile:react-native-prompt-android:1.0.0-wp-3
-          |    \--- androidx.appcompat:appcompat:1.0.0 -> 1.4.2 (*)
-          +--- com.github.wordpress-mobile:react-native-gesture-handler:2.3.2-wp-2
-          |    +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-1 -> 2.9.1-wp-3
-          |    +--- androidx.appcompat:appcompat:1.2.0 -> 1.4.2 (*)
-          |    +--- androidx.core:core-ktx:1.6.0 -> 1.8.0 (*)
-          |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.20 -> 1.6.21 (*)
-          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-get-random-values:1.4.0
-          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-safe-area-context:3.2.0
-          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-screens:2.9.0
-          |    +--- androidx.appcompat:appcompat:1.1.0 -> 1.4.2 (*)
-          |    +--- androidx.fragment:fragment:1.2.1 -> 1.5.5 (*)
-          |    +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 (*)
-          |    +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
-          |    \--- com.google.android.material:material:1.1.0 -> 1.6.0-alpha01 (*)
-          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-svg:9.13.6
-          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-webview:11.6.2
-          |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.21 (*)
-          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-masked-view:0.2.6
-          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-clipboard:1.9.0
-          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-fast-image:8.5.11
-          |    +--- com.github.bumptech.glide:glide:4.12.0
-          |    |    +--- com.github.bumptech.glide:gifdecoder:4.12.0
-          |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
-          |    |    +--- com.github.bumptech.glide:disklrucache:4.12.0
-          |    |    +--- com.github.bumptech.glide:annotations:4.12.0
-          |    |    +--- androidx.fragment:fragment:1.0.0 -> 1.5.5 (*)
-          |    |    +--- androidx.vectordrawable:vectordrawable-animated:1.0.0 -> 1.1.0 (*)
-          |    |    \--- androidx.exifinterface:exifinterface:1.2.0 -> 1.3.3 (*)
-          |    \--- com.github.bumptech.glide:okhttp3-integration:4.12.0
-          |         +--- com.github.bumptech.glide:glide:4.12.0 (*)
-          |         +--- com.squareup.okhttp3:okhttp:3.9.1 -> 4.9.2 (*)
-          |         \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
-          +--- org.wordpress-mobile.gutenberg-mobile:react-native-aztec:v1.93.0
-          |    +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
-          |    +--- androidx.gridlayout:gridlayout:1.0.0
-          |    |    +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
-          |    |    \--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
-          |    +--- androidx.cardview:cardview:1.0.0 (*)
-          |    +--- androidx.appcompat:appcompat:1.2.0 -> 1.4.2 (*)
-          |    +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.2.1 (*)
-          |    +--- org.wordpress:aztec:v1.6.3 (*)
-          |    +--- org.wordpress.aztec:wordpress-shortcodes:v1.6.3 (*)
-          |    +--- org.wordpress.aztec:wordpress-comments:v1.6.3 (*)
-          |    +--- org.wordpress.aztec:glide-loader:v1.6.3
-          |    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.6.21 (*)
-          |    |    +--- org.wordpress:aztec:v1.6.3 (*)
-          |    |    \--- com.github.bumptech.glide:glide:4.10.0 -> 4.12.0 (*)
-          |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.21 (*)
-          \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.21 (*)
+     \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:v1.94.0-alpha1
+          +--- com.facebook.fresco:animated-gif:2.0.0
+          |    +--- com.parse.bolts:bolts-tasks:1.4.0
+          |    +--- com.facebook.soloader:soloader:0.6.0 -> 0.10.4 (*)
+          |    +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+          |    \--- com.facebook.fresco:animated-base:2.0.0
+          |         +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+          |         +--- com.facebook.fresco:imagepipeline-base:2.0.0 -> 2.5.0 (*)
+          |         +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
+          |         +--- com.facebook.fresco:animated-drawable:2.0.0
+          |         |    +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
+          |         |    +--- com.facebook.fresco:drawee:2.0.0 -> 2.5.0 (*)
+          |         |    \--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+          |         \--- com.parse.bolts:bolts-tasks:1.4.0
+          +--- com.google.android.material:material:1.2.1 -> 1.6.0-alpha01 (*)
+          +--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-5
+          |    +--- com.google.android.exoplayer:exoplayer:2.13.3
+          |    |    +--- com.google.android.exoplayer:exoplayer-core:2.13.3
+          |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+          |    |    |    +--- com.google.android.exoplayer:exoplayer-common:2.13.3
+          |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+          |    |    |    |    \--- com.google.guava:guava:27.1-android
+          |    |    |    |         +--- com.google.guava:failureaccess:1.0.1
+          |    |    |    |         \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
+          |    |    |    \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
+          |    |    |         +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+          |    |    |         \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+          |    |    +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
+          |    |    |    +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+          |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+          |    |    +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
+          |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+          |    |    |    \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+          |    |    +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
+          |    |    |    +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+          |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+          |    |    +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
+          |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+          |    |    |    \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+          |    |    \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
+          |    |         +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+          |    |         +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+          |    |         +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.2.1 (*)
+          |    |         \--- androidx.media:media:1.2.1 (*)
+          |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+          |    +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
+          |    +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
+          |    +--- com.google.android.exoplayer:extension-okhttp:2.13.3
+          |    |    +--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+          |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+          |    |    \--- com.squareup.okhttp3:okhttp:3.12.11 -> 4.9.2 (*)
+          |    \--- com.squareup.okhttp3:okhttp:${OKHTTP_VERSION} -> 4.9.2 (*)
+          +--- com.github.wordpress-mobile:react-native-linear-gradient:2.5.6-wp-3
+          +--- com.github.wordpress-mobile:react-native-slider:3.0.2-wp-3
+          +--- com.github.wordpress-mobile:react-native-reanimated:2.9.1-wp-3
+          +--- com.github.wordpress-mobile:react-native-prompt-android:1.0.0-wp-3
+          |    \--- androidx.appcompat:appcompat:1.0.0 -> 1.4.2 (*)
+          +--- com.github.wordpress-mobile:react-native-gesture-handler:2.3.2-wp-2
+          |    +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-1 -> 2.9.1-wp-3
+          |    +--- androidx.appcompat:appcompat:1.2.0 -> 1.4.2 (*)
+          |    +--- androidx.core:core-ktx:1.6.0 -> 1.8.0 (*)
+          |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.20 -> 1.6.21 (*)
+          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-get-random-values:1.4.0
+          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-safe-area-context:3.2.0
+          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-screens:2.9.0
+          |    +--- androidx.appcompat:appcompat:1.1.0 -> 1.4.2 (*)
+          |    +--- androidx.fragment:fragment:1.2.1 -> 1.5.5 (*)
+          |    +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 (*)
+          |    +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
+          |    \--- com.google.android.material:material:1.1.0 -> 1.6.0-alpha01 (*)
+          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-svg:9.13.6
+          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-webview:11.6.2
+          |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.21 (*)
+          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-masked-view:0.2.6
+          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-clipboard:1.9.0
+          +--- org.wordpress-mobile.react-native-libraries.v1:react-native-fast-image:8.5.11
+          |    +--- com.github.bumptech.glide:glide:4.12.0
+          |    |    +--- com.github.bumptech.glide:gifdecoder:4.12.0
+          |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
+          |    |    +--- com.github.bumptech.glide:disklrucache:4.12.0
+          |    |    +--- com.github.bumptech.glide:annotations:4.12.0
+          |    |    +--- androidx.fragment:fragment:1.0.0 -> 1.5.5 (*)
+          |    |    +--- androidx.vectordrawable:vectordrawable-animated:1.0.0 -> 1.1.0 (*)
+          |    |    \--- androidx.exifinterface:exifinterface:1.2.0 -> 1.3.3 (*)
+          |    \--- com.github.bumptech.glide:okhttp3-integration:4.12.0
+          |         +--- com.github.bumptech.glide:glide:4.12.0 (*)
+          |         +--- com.squareup.okhttp3:okhttp:3.9.1 -> 4.9.2 (*)
+          |         \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
+          +--- org.wordpress-mobile.gutenberg-mobile:react-native-aztec:v1.94.0-alpha1
+          |    +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
+          |    +--- androidx.gridlayout:gridlayout:1.0.0
+          |    |    +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
+          |    |    \--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
+          |    +--- androidx.cardview:cardview:1.0.0 (*)
+          |    +--- androidx.appcompat:appcompat:1.2.0 -> 1.4.2 (*)
+          |    +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.2.1 (*)
+          |    +--- org.wordpress:aztec:v1.6.3 (*)
+          |    +--- org.wordpress.aztec:wordpress-shortcodes:v1.6.3 (*)
+          |    +--- org.wordpress.aztec:wordpress-comments:v1.6.3 (*)
+          |    +--- org.wordpress.aztec:glide-loader:v1.6.3
+          |    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.6.21 (*)
+          |    |    +--- org.wordpress:aztec:v1.6.3 (*)
+          |    |    \--- com.github.bumptech.glide:glide:4.10.0 -> 4.12.0 (*)
+          |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.21 (*)
+          \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.21 (*)

Please review and act accordingly

@SiobhyB SiobhyB merged commit 99e80b5 into trunk Apr 20, 2023
@SiobhyB SiobhyB deleted the gutenberg/emit-editor-save-events branch April 20, 2023 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Editing and display of Gutenberg blocks.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VideoPress block: Limit synchronization of block attributes to when post has just been saved
3 participants